import axios from "@/http/http.js";
// 封装获取病历信息接口
export const medicalHistoryFindAPI = (data) => {
    return axios({
        url: '/medicalHistory/find',
        method: 'post',
        data,
        headers: { "content-type": "application/x-www-form-urlencoded" }
    })
};

// 封装通过ID获取居民病历接口
export const medicalHistoryFindByAppointmentIdAPI = (id) => {
    return axios({
        url: `/medicalHistory/findMedicalHistoryByAppointmentId/${id}`,
        method: 'post',
    })
};

// 封装修改居民病历接口
export const medicalHistoryUpdateAPI = (data) => {
    return axios({
        url: '/medicalHistory/updateMedicalHistory',
        method: 'put',
        data
    })
};

// 封装添加居民病历接口
export const medicalHistoryAddAPI = (data) => {
    return axios({
        url: '/medicalHistory/addMedicalHistory',
        method: 'post',
        data
    })
};

// 封装通过居民ID获取过往病历列表接口
export const medicalHistoryListFindByResidentIdAPI = (data) => {
    return axios({
        url: '/medicalHistory/findMedicalHistoryListByResidentId',
        method: 'post',
        data
    })
};